#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int N = 0; //100005

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	int n;
	cin >> n;
	int num_1 = n/5,cnt = n%5;
	if(cnt >= 3)
	{
		num_1--;
		cout << "2";
	}
	for(int i=1;i<=num_1;i++)
	{
		cout << "1";
	}
	return 0;
}
